#!/usr/bin/env python3
# -*- coding: UTF-8 -*-

import json

def bear_json_transform(entry:map):
    if 'arguments' in entry:
        command = ' '.join(entry['arguments'])
        del entry['arguments']
        entry['command'] = command
        return entry
    elif 'command' in entry:
        return entry